import 'package:flutter/material.dart';

class SliverToBoxDemo extends StatelessWidget {
  const SliverToBoxDemo({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("SliverToBoxAdapter"),
      ),
      body: CustomScrollView(
        slivers: [
          SliverToBoxAdapter(
            child: SizedBox(
              height: 100,
              child: PageView(
                children: const [Text("1"), Text("2")],
              ),
            ),
          ),
          SliverToBoxAdapter(
            child: Container(
              height: 100,
              color: Colors.blue,
            ),
          )
        ],
      ),
    );
  }
}
